Conversation
- Replace separate lint/fmt scripts with `vp check` / `vp check --fix` - Add husky + lint-staged for pre-commit hooks running `vp check --fix` - Upgrade vite-plus to 0.0.0-g61d318d2.20260227-0939 - Consolidate CI lint/fmt steps into single check step - Update CLAUDE.md command documentation
Use String(error) for unknown-typed catch variables in template literals.
Add json, md, yaml, yml, css, scss, less, graphql, html, and vue to lint-staged config with `vp fmt` for formatting on pre-commit.
There was a problem hiding this comment.
Pull request overview
This PR consolidates formatting/linting into a single vp check workflow, adds pre-commit automation, and updates CI/docs to match the new developer experience.
Changes:
- Replace separate
lint/fmtscripts with unifiedcheck/check:fix. - Add Husky + lint-staged to run checks on pre-commit.
- Update CI to run a single “Check” step and bump
vite-plus(and related lockfile deps).
Reviewed changes
Copilot reviewed 8 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/utils.ts |
Standardizes error stringification in command execution failure logging. |
src/run-install.ts |
Standardizes error stringification in install failure handling. |
src/index.ts |
Standardizes error stringification when printing vp version fails. |
src/cache-save.ts |
Standardizes error stringification on cache save failure warning. |
package.json |
Introduces check/check:fix, adds Husky/lint-staged config and prepare hook. |
CLAUDE.md |
Updates documented commands to use check and refreshes commit guidance. |
.husky/pre-commit |
Adds a pre-commit hook to run lint-staged. |
.github/workflows/test.yml |
Consolidates CI lint/format into a single vp run check step; adds merge_group trigger. |
pnpm-lock.yaml |
Locks new dev dependencies and the upgraded vite-plus version. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
CLAUDE.md
Outdated
| ``` | ||
|
|
||
| **Important:** Always run `vp fmt` and `vp run build` before committing - the `dist/index.mjs` must be committed. | ||
| **Important:** Always run `vp check --fix` and `vp run build` before committing - the `dist/index.mjs` must be committed. |
There was a problem hiding this comment.
The commands list uses vp run check:fix, but the “Important” line below instructs vp check --fix. This inconsistency can confuse contributors; consider aligning on one invocation (e.g., vp run check:fix) throughout this doc.
| **Important:** Always run `vp check --fix` and `vp run build` before committing - the `dist/index.mjs` must be committed. | |
| **Important:** Always run `vp run check:fix` and `vp run build` before committing - the `dist/index.mjs` must be committed. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 10 changed files in this pull request and generated 1 comment.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "vite-plus": "latest" | ||
| }, | ||
| "lint-staged": { | ||
| "*": "vp check --fix" |
There was a problem hiding this comment.
lint-staged appends the matched file paths to the command it runs. With the current config ("*": "vp check --fix"), the hook will run vp check --fix <all-staged-files> (including non-TS files), which can fail if vp check doesn’t accept positional file args and also doesn’t match the PR description of only running on staged .ts files. Consider scoping the pattern to TS (e.g. "*.ts": ... / "*.{ts,tsx}": ...) and/or wrapping the command so lint-staged doesn’t append filenames if vp check is repo-wide.
| "*": "vp check --fix" | |
| "*.{ts,tsx}": "vp check --fix" |
Summary
lint,lint:fix,fmt,fmt:checkscripts with unifiedvp check/vp check --fixvp check --fixon staged.tsfiles0.0.0-b1666489.20260220-0254to0.0.0-g61d318d2.20260227-0939Test plan
vp run checkpasses (only warnings, no errors)vp run test— all 30 tests passvp run build— builds successfully🤖 Generated with Claude Code